﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace xmlBookstore.classLibrary
{
    public class Book
    {
        private int _id;
        private string _title;
        private string _author;
        private int _year;
        private Category _cat;
        private double _price;
        private int _countInStorage;

        public Book() { }
        public Book(int id, string title, string author, int year, Category cat)
        {
            _id = id;
            _cat = cat;
            _year = year;
            _author = author;
            _title = title;
        }
        public Book(int id, string title, string author, int year, Category cat, int price, int amount)
        {
            _id = id;
            _cat = cat;
            _year = year;
            _author = author;
            _title = title;
            _price = price;
            _countInStorage = amount;
        }


        public int CountInStorage
        {
            get { return _countInStorage; }
            set { _countInStorage = value; }
        }

        public double Price
        {
            get { return _price; }
            set { _price = value; }
        }

        public Category Cat
        {
            get { return _cat; }
        }

        public int Year
        {
            get { return _year; }
        }

        public string Author
        {
            get { return _author; }
        }

        public string Title
        {
            get { return _title; }
        }

        public int Id
        {
            get { return _id; }
        }
    }
}
